<template>
	<view class="card" @click="onClick">
		<view class="card-content">
			<view v-if="title">
				<text class="title">{{title}}</text>
				<vant-tag class="status" type="warning">待审批</vant-tag>
			</view>
			<view class="">
				<text>调班日期：202110-23</text>
			</view>
			<view class="">
				<text>申请人：202110-23</text>
			</view>
			<view class="worktype">
				<text>申请班种：202110-23</text>
				<vant-tag v-if="!title" class="status" type="warning">待审批</vant-tag>
			</view>
			<view class="">
				<text>调换班种：202110-23</text>
			</view>
			<view class="">
				<text>调换对象：202110-23</text>
			</view>
			<view class="">
				<text>申请理由：202110-23</text>
			</view>
		</view>
		<view class="card-apply-date">
			2021-11-27
		</view>
	</view>
</template>

<script>
	export default {
		emits: ['card-click'],
		props:{
			title: {
				type: String,
				default: ''
			},
		},
		data() {
			return {
				
			}
		},
		methods: {
			onClick() {
				console.log('card Click')
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
	.card {
		margin: 28rpx 0;
		color: #999999;
		background-color: #FFFFFF;	
		&-content {
			padding: 28rpx 30rpx;
			.title {
				color: #000000;
				font-size: 30rpx;
				margin-right: 15rpx;
			}
			.worktype {
				display: flex;
				justify-content: space-between;
			}
		}
		&-apply-date {
			border-top: 1px solid #99999914;
			padding: 10rpx 30rpx;
			text-align: right;
		}
	}
</style>
